import request from "../axios";

const api = {
    //code登录
    code_login(data) {
        return request({
            url: "/member/auth/social-login",
            method: "POST",
            data: data,
        });
    },

    //获得内购品牌信息列表
    brand_list(params) {
        return request({
            url: "/product/inner-mall-brand/list",
            method: "GET",
            params: params,
        });
    },


    //获得内购活动列表
    activity_by_id(params) {
        return request({
            url: "/promotion/inner-mall-activity-main/get/by/brand/id",
            method: "GET",
            params: params,
        });
    },
    //获得内购活动详情  
    activity_detail_by_id(params) {
        return request({
            url: "/promotion/inner-mall-activity-main/get/id",
            method: "GET",
            params: params,
        });
    },

    //获得内购活动商品 
    product_by_id(params) {
        return request({
            url: "/promotion/inner-mall-activity-product-stock/get/by/activity/id",
            method: "GET",
            params: params,
        });
    },

    // //添加购物车商品
    // cart_add(data) {
    //     return request({
    //         url: "/trade/inner-mall/cart/add",
    //         method: "POST",
    //         data: data,
    //     });
    // },
    // //更新购物车商品数量
    // cart_update_count(data) {
    //     return request({
    //         url: "/trade/inner-mall/cart/update-count",
    //         method: "PUT",
    //         data: data,
    //     });
    // },
    // //更新购物车商品选中
    // cart_update_count(data) {
    //     return request({
    //         url: "/trade/inner-mall/cart/update-selected",
    //         method: "PUT",
    //         data: data,
    //     });
    // },
    // //查询用户的购物车列表
    // cart_list(params) {
    //     return request({
    //         url: "/trade/inner-mall/cart/list",
    //         method: "GET",
    //         params: params,
    //     });
    // },
    // //删除购物车商品
    // cart_deletet(data) {
    //     return request({
    //         url: "/trade/inner-mall/cart/delete",
    //         method: "DELETE",
    //         data: data,
    //     });
    // },
};

export default api;
